CS 111: Test 3 info

Table of Contents

Notes sheet

You are permitted one 8.5 x 11 handwritten notes sheet (both sides) for use as a reference during the exam.

How to study

Lots of research has shown that reading over material is only a starting point for preparing for exams. It’s not sufficient. The critical thing to do is to practice. Reading how to swing a baseball bat or how to cross-country ski might give you some good ideas on how to get better the next time you try it, but it’s not even close to just getting out there and swinging a bat or skiing in the Arb.

How can you practice? One thing you can do is try the exercises at the end of each chapter, for which the solutions are available online. Practice these under test conditions and see how you do. You can also work again through all of the CodeCheck exercises, which are also likely great examples on how to practice.

Make sure to do all of your practicing on paper, not at a keyboard, so as to simulate the exam conditions.

Exam content

Listed below is the material that I have in mind that you should know for the exam. It’s what’s in my head when creating it. That said, this isn’t a contract. I may have inadvertently left something off this list that ends up on an exam question. I make no guarantees that the exam will be 100% limited to items listed below. Moreover, I may not be able to test all of this material given the time limitations of the exam. I may have to pick and choose some subset of it.

Exam format

The questions will vary, but might consist of things like:

  • multiple choice
  • fill in the blank
  • write portions of Python code to accomplish tasks
  • write a sentence or two explaining something
  • other possibilities, but hopefully you get the idea

Ultimately, the content that I will be drawing from for the exam is material that we have talked about in class, and material that you have used in CodeCheck labs and on assignments, but also ideas that we have discussed in class. The textbook does have a variety of things mentioned in passing that are worth knowing, but if we haven’t discussed it in class and/or if it hasn’t been part of a lab or an assignment, I won’t test on it.

Learning goals

Students should be able to do lots of things with regards to classes and objects. Some of this was on the last exam, but we’ve done more advanced examples since then, and there has been more opportunity to practice this on assignments. So specifically, students should be able to…

  • interpret and use methods, instance variables, constructors, and parameters. Be able to write Python code that utilize all of these items. Be able to write from scratch code for a class that utilizes all of the above ideas.
  • appropriately utilize a class that they have built (or I have provided) in conjunction with a main function.
  • appropriately use return values from methods, or lack thereof.

With regards to other topics, students should be able to…

… write a recursive function correctly.

… determine the output of a provided recursive function.

… show how linear search and binary search work by demonstrating on lists of data.

… write Python code that implements a searching algorithm. A question that asks students to “write the Python code for binary search” is pointless because of the reference sheets, but I could describe a new searching algorithm and ask students to code it, or I could ask students to manipulate or interpret search code that I provide.

… count the number of comparisons in a searching algorithm for purposes of evaluating its efficiency. I could present a new searching algorithm that has some of the same flavor as the others that we have done and ask about how many comparisons the algorithm makes in the worst case, and what its general behavior is (in terms of n). I might describe the algorithm in words, or I might provide code.

… be able to create and use lists and dictionaries. Be able to manipulate lists and dictionaries within the contexts of loops and “if” statements to accomplish a desired task, as we have done with in-class examples.

… be able to write or interpret code to read and manipulate data from CSV files.

… show how selection sort, insertion sort, and merge sort work by demonstrating on lists of data.

… write Python code that implements a sorting algorithm. A question that asks students to “write the code for selection/insertion/merge sort” is pointless because of the reference sheets, but I could describe a new sorting algorithm and ask students to code it, or I could ask students to manipulate or interpret sorting code that I provide.

… count the number of comparisons in a sorting algorithm for purposes of evaluating its efficiency. I could present a new sorting algorithm that has some of the same flavor as the others that we have done and ask about how many comparisons the algorithm makes in the worst case, and what its general behavior is (in terms of n). I might describe the algorithm in words, or I might provide code.

… continue to be able to use important programming skills from the first two-thirds of the course. Exam questions won’t be written with the explicit purpose of testing these items, but could easily include them as part of a problem designed to test a more recent idea.